import pyautogui
import os
#遍历指定文件夹的图片，对每个图片在屏幕中找是否出现，出现则返回point,未出现则point为None
def findOneFromDir(dir,con):
    fileList = os.listdir(dir)
    for fileName in fileList:
        point = pyautogui.locateCenterOnScreen(dir + fileName,confidence=con)
        if point != None:
            break
    return (point,fileName)